package lambda;

import java.util.Comparator;

/**
 * @author zhangying
 * @date 2020-02-13
 * @description
 */
public class AppleComparator implements Comparator<Apple> {

    @Override
    public int compare(Apple a1, Apple a2) {
        return a1.getWeight() - a2.getWeight();
    }
}
